package com.vsii.sample.data;

public class Employee extends People implements Comparable<Employee>{
	private String title;
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public Employee(int id, String infoType, String name, int age, String address, int mobile) {
		super(id, infoType, name, age, address, mobile);
	}

	@Override
	public String toString() {
		return super.toString() + " title= " +title;
		
	}
// Sap xep theo id
	public int compareTo(Employee e) {
		return this.getId() - e.getId();
	}	
	// sap xep theo title
//	@Override 
//	public int compareTo(Employee e) {
//		return this.getTitle().compareTo(e.getTitle());
//	}	
}
